The present invention relates to distributed processing computer systems, and more particularly to distributed processing computer systems using optimistic locks.
In multiple processor computer systems, processors communicate with each other with messages. Messages are sent via servers to request or transmit information. The server interface often consists of a middleware application such as replicated message systems. Optimistic locks may be used at the processor, or “client”, which become classical contended locks at the server. An optimistic lock may be rejected by the server causing the client and server to process and transmit additional data. Optimistic lock strategies generally work well where there is little likelihood of contention between competing processors, or clients, processing the messages.
For example, multiple consumers are able to process a message sent from another client that produces the message via the server. Each client processes the message under the optimistic lock strategy. In replicated message systems, the results from each client are transmitted across a network and received by the server. The server applies and distributes the first set of results, while any subsequent result relating to the same message is rejected. This is a common situation in an application server configuration where different threads of control are executing concurrently in the same operating system, such as executing competing clients that are draining a message queue. In the classic approach, each client takes contended hard locks on the messages and then processes each message.
A solution by Tibco Software Inc. of Palo Alto, Calif., United States of America, follows an approach of having clients publish messages, and a separate server to nominate which client to process a given message. In the Tibco approach, the originating client publishes the message. A second server then nominates which client is to process the message. A replicated message system server then distributes the message. Once a client is nominated in the Tibco approach, no other client can process the message before a time delay set by the server.